/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

import { Request, Response } from 'express';
import { ResponseItem, responseSuccess } from '../utils';
import type { TableListItem } from '@/pages/vehicleCall/register/index.d';
import Mock from 'mockjs';

const Random = Mock.Random;
export default {
  'POST /vehicleCall/driverList': (req: Request, res: Response) => {
    const data: TableListItem[] = Mock.mock({
      'list|1-30': [
        {
          id: '@id()',
          name: Random.cname(),
          identityCard: Random.cname(),
          mobile: Random.cname(),
          registrationTime: Random.cname(),
          weChatNickName: Random.cname(),
          auditTime: Random.cname(),
          'status|1-3': 3,
          license: [
            'https://osscdn-kbad.kuaidihelp.com/admin/ad/2022/05/09/6278cc3fa0df4/after.png',
            'https://osscdn-kbad.kuaidihelp.com/admin/ad/2022/05/09/6278cc3fa0df4/after.png',
          ],
        },
      ],
    });

    const result: ResponseItem = {
      code: 0,
      msg: '成功',
      data,
    };
    return res.json(result);
  },
  'POST /vehicleCall/driverExamine': (req: Request, res: Response) => responseSuccess(req, res),
};
